package com.app.ryjy.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 国家代码枚举
 */
@AllArgsConstructor
@Getter
public enum CountryCodeEnum {

    NONE("无", 0, -1),
    ANTARCTICA ("南极洲", 10, -1),
    BULGARIA ("保加利亚", 100, -1),
    MYANMAR ("缅甸", 104, -1),
    BURUNDI ("布隆迪", 108, -1),
    BELARUS ("白俄罗斯", 112, -1),
    CAMBODIA ("柬埔寨", 116, -1),
    ALGERIA ("阿尔及利亚", 12, -1),
    CAMEROON ("喀麦隆", 120, -1),
    CANADA ("加拿大", 124, -1),
    CAPE_VERDE ("佛得角", 132, -1),
    CAYMAN_ISLANDS ("开曼群岛", 136, -1),
    CENTRAL_AFRICAN_REPUBLIC ("中非", 140, -1),
    SRI_LANKA ("斯里兰卡", 144, -1),
    CHAD ("乍得", 148, -1),
    CHILE ("智利", 152, -1),
    CHINA ("中国", 156, -1),
    TAIWAN ("台湾", 158, -1),
    AMERICAN_SAMOA ("美属萨摩亚", 16, -1),
    CHRISTMAS_ISLAND ("圣诞岛", 162, -1),
    COCOS_ISLANDS ("科科斯（基林）群岛", 166, -1),
    COLOMBIA ("哥伦比亚", 170, -1),
    COMOROS ("科摩罗", 174, -1),
    MAYOTTE ("马约特", 175, -1),
    CONGO ("刚果（布）", 178, -1),
    DEMOCRATIC_REPUBLIC_OF_THE_CONGO ("刚果（金）", 180, -1),
    COOK_ISLANDS ("库克群岛", 184, -1),
    COSTA_RICA ("哥期达黎加", 188, -1),
    CROATIA ("克罗地亚", 191, -1),
    CUBA ("古巴", 192, -1),
    CYPRUS ("塞浦路斯", 196, -1),
    ANDORRA ("安道尔", 20, -1),
    CZECH_REPUBLIC ("捷克", 203, -1),
    BENIN ("贝宁", 204, -1),
    DENMARK ("丹麦", 208, -1),
    DOMINICA ("多米尼克", 212, -1),
    DOMINICAN_REPUBLIC ("多米尼加", 214, -1),
    ECUADOR ("厄瓜多尔", 218, -1),
    EL_SALVADOR ("萨尔瓦多", 222, -1),
    EQUATORIAL_GUINEA ("赤道几内亚", 226, -1),
    ETHIOPIA ("埃塞俄比亚", 231, -1),
    ERITREA ("厄立特里亚", 232, -1),
    ESTONIA ("爱沙尼亚", 233, -1),
    FAROE_ISLANDS ("法罗群岛", 234, -1),
    FALKLAND_ISLANDS ("福克兰群岛（马尔维纳斯）", 238, -1),
    SOUTH_GEORGIA_AND_THE_SOUTH_SANDWICH_ISLANDS ("南乔治亚岛和南桑德韦奇岛", 239, -1),
    ANGOLA ("安哥拉", 24, -1),
    FIJI ("斐济", 242, -1),
    FINLAND ("芬兰", 246, -1),
    FRANCE ("法国", 250, -1),
    FRENCH_GUIANA ("法属圭亚那", 254, -1),
    FRENCH_POLYNESIA ("法属波利尼西亚", 258, -1),
    FRENCH_SOUTHERN_TERRITORIES ("法属南部领地", 260, -1),
    DJIBOUTI ("吉布提", 262, -1),
    GABON ("加蓬", 266, -1),
    GEORGIA ("格鲁吉亚", 268, -1),
    GAMBIA ("冈比亚", 270, -1),
    PALESTINE ("巴勒斯坦", 275, -1),
    GERMANY ("德国", 276, -1),
    ANTIGUA_AND_BARBUDA ("安提瓜和巴布达", 28, -1),
    GHANA ("加纳", 288, -1),
    GIBRALTAR ("直布罗陀", 292, -1),
    KIRIBATI ("基里巴斯", 296, -1),
    GREECE ("希腊", 300, -1),
    GREENLAND ("格陵兰", 304, -1),
    GRENADA ("格林纳达", 308, -1),
    AZERBAIJAN ("阿塞拜疆", 31, -1),
    GUADELOUPE ("瓜德罗普", 312, -1),
    GUAM ("关岛", 316, -1),
    ARGENTINA ("阿根廷", 32, -1),
    GUATEMALA ("危地马拉", 320, -1),
    GUINEA ("几内亚", 324, -1),
    GUYANA ("圭亚那", 328, -1),
    HAITI ("海地", 332, -1),
    HEARD_ISLAND_AND_MCDONALD_ISLANDS ("赫德岛和麦克唐纳岛", 334, -1),
    HOLY_SEE ("梵蒂冈", 336, -1),
    HONDURAS ("洪都拉斯", 340, -1),
    HONG_KONG ("香港", 344, -1),
    HUNGARY ("匈牙利", 348, -1),
    ICELAND ("冰岛", 352, -1),
    INDIA ("印度", 356, -1),
    AUSTRALIA ("澳大利亚", 36, -1),
    INDONESIA ("印度尼西亚", 360, -1),
    IRAN ("伊朗", 364, -1),
    IRAQ ("伊拉克", 368, -1),
    IRELAND ("爱尔兰", 372, -1),
    ISRAEL ("以色列", 376, -1),
    ITALY ("意大利", 380, -1),
    COTE_DIVOIRE ("科特迪瓦", 384, -1),
    JAMAICA ("牙买加", 388, -1),
    JAPAN ("日本", 392, -1),
    KAZAKHSTAN ("哈萨克斯坦", 398, -1),
    AFGHANISTAN ("阿富汉", 4, -1),
    AUSTRIA ("奥地利", 40, -1),
    JORDAN ("约旦", 400, -1),
    KENYA ("肯尼亚", 404, -1),
    NORTH_KOREA ("朝鲜", 408, -1),
    SOUTH_KOREA ("韩国", 410, -1),
    KUWAIT ("科威特", 414, -1),
    KYRGYZSTAN ("吉尔吉斯斯坦", 417, -1),
    LAOS ("老挝", 418, -1),
    LEBANON ("黎巴嫩", 422, -1),
    LESOTHO ("莱索托", 426, -1),
    LATVIA ("拉脱维亚", 428, -1),
    LIBERIA ("利比里亚", 430, -1),
    LIBYA ("利比亚", 434, -1),
    LIECHTENSTEIN ("列支敦土登", 438, -1),
    BAHAMAS ("巴哈马", 44, -1),
    LITHUANIA ("立陶宛", 440, -1),
    LUXEMBOURG ("卢森堡", 442, -1),
    MACAO ("澳门", 446, -1),
    MADAGASCAR ("马达加斯加", 450, -1),
    MALAWI ("马拉维", 454, -1),
    MALAYSIA ("马来西亚", 458, -1),
    MALDIVES ("马尔代夫", 462, -1),
    MALI ("马里", 466, -1),
    MALTA ("马耳他", 470, -1),
    MARTINIQUE ("马提尼克", 474, -1),
    MAURITANIA ("毛里塔尼亚", 478, -1),
    BAHRAIN ("巴林", 48, -1),
    MAURITIUS ("毛里求斯", 480, -1),
    MEXICO ("墨西哥", 484, -1),
    MONACO ("摩纳哥", 492, -1),
    MONGOLIA ("蒙古", 496, -1),
    MOLDOVA ("摩尔多瓦", 498, -1),
    BANGLADESH ("孟加拉国", 50, -1),
    MONTSERRAT ("蒙特塞拉特", 500, -1),
    MOROCCO ("摩洛哥", 504, -1),
    MOZAMBIQUE ("莫桑比克", 508, -1),
    ARMENIA ("亚美尼亚", 51, -1),
    OMAN ("阿曼", 512, -1),
    NAMIBIA ("纳米比亚", 516, -1),
    BARBADOS ("巴巴多斯", 52, -1),
    NAURU ("瑙鲁", 520, -1),
    NEPAL ("尼泊尔", 524, -1),
    NETHERLANDS ("荷兰", 528, -1),
    NETHERLANDS_ANTILLES ("荷属安的列斯", 530, -1),
    ARUBA ("阿鲁巴", 533, -1),
    NEW_CALEDONIA ("新喀里多尼亚", 540, -1),
    VANUATU ("瓦努阿图", 548, -1),
    NEW_ZEALAND ("新西兰", 554, -1),
    NICARAGUA ("尼加拉瓜", 558, -1),
    BELGIUM ("比利时", 56, -1),
    NIGER ("尼日尔", 562, -1),
    NIGERIA ("尼日利亚", 566, -1),
    NIUE ("纽埃", 570, -1),
    NORFOLK_ISLAND ("诺福克岛", 574, -1),
    NORWAY ("挪威", 578, -1),
    NORTHERN_MARIANA_ISLANDS ("北马里亚纳", 580, -1),
    UNITED_STATES_OUTLYING_ISLANDS ("美国本土外岛屿", 581, -1),
    MICRONESIA ("密克罗尼西亚联邦", 583, -1),
    MARSHALL_ISLANDS ("马绍尔群岛", 584, -1),
    PALAU ("帕劳", 585, -1),
    PAKISTAN ("巴基斯坦", 586, -1),
    PANAMA ("巴拿马", 591, -1),
    PAPUA_NEW_GUINEA ("巴布亚新几内亚", 598, -1),
    BERMUDA ("百慕大", 60, -1),
    PARAGUAY ("巴拉圭", 600, -1),
    PERU ("秘鲁", 604, -1),
    PHILIPPINES ("菲律宾", 608, -1),
    PITCAIRN_ISLANDS ("皮特凯恩", 612, -1),
    POLAND ("波兰", 616, -1),
    PORTUGAL ("葡萄牙", 620, -1),
    GUINEA_BISSAU ("几内亚比绍", 624, -1),
    TIMOR_LESTE ("东帝汶", 626, -1),
    PUERTO_RICO ("波多黎各", 630, -1),
    QATAR ("卡塔尔", 634, -1),
    REUNION ("留尼汪", 638, -1),
    BHUTAN ("不丹", 64, -1),
    ROMANIA ("罗马尼亚", 642, -1),
    RUSSIAN_FEDERATION ("俄罗斯联邦", 643, -1),
    RWANDA ("卢旺达", 646, -1),
    SAINT_HELENA ("圣赫勒拿", 654, -1),
    SAINT_KITTS_AND_NEVIS ("圣基茨和尼维斯", 659, -1),
    ANGUILLA ("安圭拉", 660, -1),
    SAINT_LUCIA ("圣卢西亚", 662, -1),
    SAINT_PIERRE_AND_MIQUELON ("圣皮埃尔和密克隆", 666, -1),
    SAINT_VINCENT_AND_THE_GRENADINES ("圣文森特和格林纳丁斯", 670, -1),
    SAN_MARINO ("圣马力诺", 674, -1),
    SAO_TOME_AND_PRINCIPE ("圣多美和普林西比", 678, -1),
    BOLIVIA ("玻利维亚", 68, -1),
    SAUDI_ARABIA ("沙特阿拉伯", 682, -1),
    SENEGAL ("塞内加尔", 686, -1),
    SEYCHELLES ("塞舌尔", 690, -1),
    SIERRA_LEONE ("塞拉利昂", 694, -1),
    BOSNIA_AND_HERZEGOVINA ("波黑", 70, -1),
    SINGAPORE ("新加坡", 702, -1),
    SLOVAKIA ("斯洛伐克", 703, -1),
    VIET_NAM ("越南", 704, -1),
    SLOVENIA ("斯洛文尼亚", 705, -1),
    SOMALIA ("索马里", 706, -1),
    SOUTH_AFRICA ("南非", 710, -1),
    ZIMBABWE ("津巴布韦", 716, -1),
    BOTSWANA ("博茨瓦纳", 72, -1),
    SPAIN ("西班牙", 724, -1),
    WESTERN_SAHARA ("西撒哈拉", 732, -1),
    SUDAN ("苏丹", 736, -1),
    BOUVET_ISLAND ("布维岛", 74, -1),
    SURINAME ("苏里南", 740, -1),
    SVALBARD_AND_JAN_MAYEN ("斯瓦尔巴岛和扬马延岛", 744, -1),
    SWAZILAND ("斯威士兰", 748, -1),
    SWEDEN ("瑞典", 752, -1),
    SWITZERLAND ("瑞士", 756, -1),
    BRAZIL ("巴西", 76, -1),
    SYRIA ("叙利亚", 760, -1),
    TAJIKISTAN ("塔吉克斯亚", 762, -1),
    THAILAND ("泰国", 764, -1),
    TOGO ("多哥", 768, -1),
    TOKELAU ("托克劳", 772, -1),
    TONGA ("汤加", 776, -1),
    TRINIDAD_AND_TOBAGO ("特立尼达和多巴哥", 780, -1),
    UNITED_ARAB_EMIRATES ("阿联酋", 784, -1),
    TUNISIA ("突尼斯", 788, -1),
    TURKEY ("土耳其", 792, -1),
    TURKMENISTAN ("土库曼斯坦", 795, -1),
    TURKS_AND_CAICOS_ISLANDS ("特克斯和凯科斯群岛", 796, -1),
    TUVALU ("图瓦卢", 798, -1),
    ALBANIA ("阿尔巴尼亚", 8, -1),
    UGANDA ("乌干达", 800, -1),
    UKRAINE ("乌克兰", 804, -1),
    THE_FORMER_YUGOSLAV_REPUBLIC_OF_MACEDONIA ("前南马其顿", 807, -1),
    EGYPT ("埃及", 818, -1),
    UNITED_KINGDOM ("英国", 826, -1),
    TANZANIA ("坦桑尼亚", 834, -1),
    BELIZE ("伯利兹", 84, -1),
    UNITED_STATES ("美国", 840, -1),
    UNITED_STATES_VIRGIN_ISLANDS ("美属维尔京群岛", 850, -1),
    BURKINA_FASO ("布基纳法索", 854, -1),
    URUGUAY ("乌拉圭", 858, -1),
    BRITISH_INDIAN_OCEAN_TERRITORY ("英属印度洋领地", 86, -1),
    UZBEKISTAN ("乌兹别克斯坦", 860, -1),
    VENEZUELA ("委内瑞拉", 862, -1),
    WALLIS_AND_FUTUNA ("瓦利斯和富图纳", 876, -1),
    SAMOA ("萨摩亚", 882, -1),
    YEMEN ("也门", 887, -1),
    YUGOSLAVIA ("南斯拉夫", 891, -1),
    ZAMBIA ("赞比亚", 894, -1),
    SOLOMON_ISLANDS ("所罗门群岛", 90, -1),
    BRITISH_VIRGIN_ISLANDS ("英属维尔京群岛", 92, -1),
    BRUNEI ("文莱", 96, -1);


    private final String desc;
    private final int code;
    private final int bizCode;

    /**
     * 根据bizCode获取code
     *
     * @param bizCode bizCode
     * @return code
     */
    public static int getCodeByBizCode(int bizCode) {
        for (CountryCodeEnum status : values()) {
            if (status.getBizCode() == bizCode) {
                return status.getCode();
            }
        }
        throw new RuntimeException("bizCode不存在"); // 或者抛出一个异常，如果bizCode不存在
    }

    }
